﻿using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CADTool
{
    public static class W
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="point"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public static bool GetPoint(out Point3d point,string message="")
        {
            point= new Point3d();
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            PromptPointResult ppr = ed.GetPoint(message);
            if (ppr.Status==PromptStatus.OK)
            {
                point = ppr.Value;
                return true;
            }
            return false;
        }

    }
}
